<?php 
// wymagane w layout
echo $this->Section->main();
?>

<body>
<div class="main">
	<?php echo $this->element('header')?>

	<div class="content">
		<div class="content_resize">
      
			<div class="sidebar">
				<div class="gadget">
					<h2 class="star">Menu</h2>
					<?php echo $this->element('left_menu')?>
				</div>
			</div>
			<!-- sidebar/ -->
			<div class="mainbar">
				<div class="article-text">
					<div class="title">
						<h2><?php echo $news['News']['name']; ?></h2>
					</div>                    
					<div class="description">
					</div>
					<div class="info"><em><?php echo $news['News']['small_content']?></em></div>
					<div class="text">
						<?php echo $fileUpload->image($news['NewUpload']['name'],array('autoResize'=>true,'width'=>300,'imagePathOnly'=>false,'style'=>'float: left; padding: 10px; margin: 10px;'));?>
					    <p><?php echo $news['News']['content']; ?></p>
					</div>
				</div>            
			</div>
			<!-- mainbar/ -->
			<div class="clr"></div>
		</div>
	</div>
	<?php echo $this->element('footer_fbg')?>
	<?php echo $this->element('footer')?>
</div>

<?php if($session->check('Auth.User.id') && $this->Session->read('Auth.User.group') == 'admin' || $session->check('Auth.User.id') && $this->Session->read('Auth.User.group') == 'manag'){?>
<?php $this->Footpanel->install();?>
<div id="footpanel">
	<ul>
		<li><?php echo $this->Html->link(__('Home', true).'<small>'.__('Home', true).'</small>', array('plugin'=>'calendar','controller'=>'news','action'=>'display'),array('escape'=>false,'class'=>'home')); ?></li>
		<li><?php echo $this->Html->link(__('Add News', true).'<small>'.__('Add News', true).'</small>', 
			array('plugin'=>'calendar','controller'=>'news','action'=>'add'),
			array('escape'=>false,'style'=>'background-image: url(/img/firma/actions_16_add.png)')); ?></li>					
		<li><?php echo $this->Html->link(__('Edit News', true).'<small>'.__('Edit News', true).'</small>', 
			array('plugin'=>'calendar','controller'=>'news','action'=>'edit',$news['News']['id']),
			array('escape'=>false,'style'=>'background-image: url(/img/firma/actions_16_edit.png)')); ?></li>					
		<li><?php echo $this->Html->link(__('Delete News', true).'<small>'.__('Delete News', true).'</small>', 
			array('plugin'=>'calendar','controller'=>'news','action'=>'delete',$news['News']['id']),
			array('escape'=>false,'style'=>'background-image: url(/img/firma/actions_16_delete.png)'),sprintf(__('Are you sure you want to delete # %s?', true), $news['News']['name'])); ?></li>					

	</ul>
</div>
<?php }?>
</body>

